﻿//-----------------------------------------------------------------------
//<copyright file="ReportBLL.cs
//Code gen by tool.
//</copyright>
//-----------------------------------------------------------------------
using System;
using PMS.Exceptions;
using System.Collections.Generic;
using PMS.DAL;
using PMS.Entity;
using System.Data;

namespace PMS.BLL
{
    public class ReportBO:BaseBO
    {
        private readonly IReportDAO ReportInterfaceObject = null;

		// Constructor
        public ReportBO()
		{
            ReportInterfaceObject = new DAL.ServiceFactory<IReportDAO>().CurrentDAL;
		}

        public DataSet PhiepNhapKhoReport(string SoPN)
        {
            try
            {
                return ReportInterfaceObject.PhiepNhapKhoReport(SoPN);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepNhapKhoReport Exception", ex);
            }
        }

        public DataSet PhiepXuatKhoReport(string SoPX)
        {
            try
            {
                return ReportInterfaceObject.PhiepXuatKhoReport(SoPX);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet PhiepGiaoHangKhoReport(string SoPG)
        {
            try
            {
                return ReportInterfaceObject.PhiepGiaoHangKhoReport(SoPG);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet BaoCaoSanPhamKhachHangDaMua(string KhachHang, DateTime? tungay, DateTime? denngay)
        {
            try
            {
                return ReportInterfaceObject.BaoCaoSanPhamKhachHangDaMua(KhachHang, tungay, denngay);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet BaoCaoCacKhachHangDaMuaSanPham(string MaThuoc, DateTime? tungay, DateTime? denngay)
        {
            try
            {
                return ReportInterfaceObject.BaoCaoCacKhachHangDaMuaSanPham(MaThuoc, tungay, denngay);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet BaoCaoDoanhThuCuaSanPham(string MaThuoc, DateTime? tungay, DateTime? denngay)
        {
            try
            {
                return ReportInterfaceObject.BaoCaoDoanhThuCuaSanPham(MaThuoc, tungay, denngay);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet BaoCaoCongNoCuaKhachHang(string MaKhachHang, DateTime? tungay, DateTime? denngay)
        {
            try
            {
                return ReportInterfaceObject.BaoCaoCongNoCuaKhachHang(MaKhachHang, tungay, denngay);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet TheKho(string MaThuoc, String Solo)
        {
            try
            {
                return ReportInterfaceObject.TheKho(MaThuoc, Solo);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet BienBanNhapHangReport(string MaBBNH)
        {
            try
            {
                return ReportInterfaceObject.BienBanNhapHangReport(MaBBNH);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet BienBanKiemKeKhoReport(string MaBBKKK)
        {
            try
            {
                return ReportInterfaceObject.BienBanKiemKeKhoReport(MaBBKKK);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet BaoCaoXuatNhapTonReport(string MaKy)
        {
            try
            {
                return ReportInterfaceObject.BaoCaoXuatNhapTonReport(MaKy);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet SanPhamListReport()
        {
            try
            {
                return ReportInterfaceObject.SanPhamListReport();
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet KhachHangListReport()
        {
            try
            {
                return ReportInterfaceObject.KhachHangListReport();
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access PhiepXuatKhoReport Exception", ex);
            }
        }

        public DataSet NhaCCListReport()
        {
            try
            {
                return ReportInterfaceObject.NhaCCListReport();
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access NhaCCListReport Exception", ex);
            }
        }

        public DataSet ChiTietNhapSanPham(string MaSP, DateTime? tungay, DateTime? denngay)
        {
            try
            {
                return ReportInterfaceObject.ChiTietNhapSanPham(MaSP, tungay, denngay);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access ChiTietNhapSanPhamReport Exception", ex);
            }
        }

        public DataSet ChiTietXuatSanPham(string MaSP, DateTime? tungay, DateTime? denngay)
        {
            try
            {
                return ReportInterfaceObject.ChiTietXuatSanPham(MaSP, tungay, denngay);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access ChiTietXuatSanPhamReport Exception", ex);
            }
        }

        public DataSet TheKhoByDate(string MaThuoc, string Solo, DateTime? tungay, DateTime? denngay)
        {
            try
            {
                return ReportInterfaceObject.TheKhoByDate(MaThuoc, Solo, tungay, denngay);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access TheKhoByDateReport Exception", ex);
            }
        }
    }
}
